package com.deercrowing.takeaway.entity;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;

/**
 * 地址表(Address)表实体类
 *
 * @author guoyongxiang
 * @since 2024-07-19 09:41:04
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("tb_address")
public class AddressEntity extends Model<AddressEntity> {
    //ID，唯一标识    
    @TableId
    private Long id;
    //用户ID    
    @TableField("users_id")
    private Long usersId;
    //收货人    
    @TableField("consignee")
    private String consignee;
    //性别，0女、1男    
    @TableField("sex")
    private Short sex;
    //手机号    
    @TableField("phone")
    private String phone;
    //省级区划编号    
    @TableField("province_code")
    private String provinceCode;
    //省级名称    
    @TableField("province_name")
    private String provinceName;
    //市级区划编号    
    @TableField("city_code")
    private String cityCode;
    //市级名称    
    @TableField("city_name")
    private String cityName;
    //区级区划编号    
    @TableField("district_code")
    private String districtCode;
    //区级名称    
    @TableField("district_name")
    private String districtName;
    //详细地址    
    @TableField("detail")
    private String detail;
    //标签    
    @TableField("label")
    private String label;
    //默认，0否、1是    
    @TableField("is_default")
    private Integer isDefault;

    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    public Serializable pkVal() {
        return this.id;
    }
    
}

